| Conditions | 1 |
| Paths | 1 |
| Total Lines | 56 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | module.exports = function(config) { |
||
| 2 | config.set({ |
||
| 3 | basePath: '', |
||
| 4 | |||
| 5 | |||
| 6 | frameworks: ['jasmine'], |
||
| 7 | |||
| 8 | files: [ |
||
| 9 | 'node_modules/angular/angular.js', |
||
| 10 | 'node_modules/angular-mocks/angular-mocks.js', |
||
| 11 | 'dist/flash.js', |
||
| 12 | 'test/*_test.js' |
||
| 13 | ], |
||
| 14 | |||
| 15 | exclude: [], |
||
| 16 | |||
| 17 | preprocessors: { |
||
| 18 | 'src/*.js': ['coverage'] |
||
| 19 | }, |
||
| 20 | |||
| 21 | // babelPreprocessor: { |
||
| 22 | // options: { |
||
| 23 | // presets: ['es2015'], |
||
| 24 | // sourceMap: 'inline' |
||
| 25 | // }, |
||
| 26 | // filename: function(file) { |
||
| 27 | // return file.originalPath.replace(/\.js$/, '.es5.js'); |
||
| 28 | // }, |
||
| 29 | // sourceFileName: function(file) { |
||
| 30 | // return file.originalPath; |
||
| 31 | // } |
||
| 32 | // }, |
||
| 33 | |||
| 34 | |||
| 35 | reporters: ['progress', 'coverage'], |
||
| 36 | |||
| 37 | coverageReporter: { |
||
| 38 | type : 'html', |
||
| 39 | dir : 'coverage/' |
||
| 40 | }, |
||
| 41 | |||
| 42 | port: 9876, |
||
| 43 | |||
| 44 | colors: true, |
||
| 45 | |||
| 46 | logLevel: config.LOG_INFO, |
||
| 47 | |||
| 48 | autoWatch: true, |
||
| 49 | |||
| 50 | browsers: ['Chrome'], |
||
| 51 | |||
| 52 | singleRun: false, |
||
| 53 | |||
| 54 | concurrency: Infinity |
||
| 55 | }) |
||
| 56 | }; |
||
| 57 |